import os
datadir = "E:\\src\\traces"
print "name\tload\tstore"
for filename in os.listdir(datadir):
  f = open(datadir + os.sep + filename)
  load = 0;store =0;interval = 0;
  for line in f:
    if 'l' == line[0]:load +=1;
    else:store +=1
    interval += int(line.split()[2])
  interval += load + store
  print "{:}\t{:.2f}%\t{:.2f}%".format(filename,load *100.0 /interval,store *100.0 /interval)